import React, { Component } from 'react'
import axios from 'axios'

export default class App extends Component {
  getStudents = ()=>{
    console.log('get students info')
    axios.get('http://localhost:3000/api/index.php').then(
      response=>{
        console.log(response)
      },
      error=>{
        console.log(error)
      }
    ).catch()
  }
  render() {
    return (
      <div>
        <button onClick={this.getStudents}>get students info</button>
      </div>
    )
  }
}
